#ifndef WIDGET_H
#define WIDGET_H
#include <QMediaPlayer>
#include <QAudioOutput>
#include <QWidget>
#include<QUrl>
#include <QListWidget>
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    void musicPlay();
private slots:
    void on_pushButton_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_last_clicked();

    void on_pushButton_next_clicked();

    void on_listWidget_itemDoubleClicked(QListWidgetItem *item);

    void on_pushButton_sound_clicked();

    void on_pushButton_list_clicked();

    void on_listWidget_itemClicked(QListWidgetItem *item);

private:
    Ui::Widget *ui;
    QList<QUrl> playlist;
    QMediaPlayer * medplayer;
    int curindex=0;
    int totalTime=0;
};
#endif // WIDGET_H
